With development of Internet technologies and popularization of intelligent terminals, functions of instant messaging applications become increasingly powerful. A user not only can send audio to another user by using an instant messaging application, but also can send a picture to the another user by using the instant messaging application. To ensure security of the picture, a sending device corresponding to the user needs to encrypt the picture before sending the picture, and sends the encrypted picture to a receiving device corresponding to the another user. Similarly, after receiving the encrypted picture, the receiving device decrypts the encrypted picture to obtain the picture.
A process in which the sending device encrypts the picture may be: The sending device obtains the picture that needs to be encrypted, encrypts the picture by using an encryption key to obtain the encrypted picture, sends the encrypted picture to the receiving device, and then sends a decryption key to the receiving device by using a secure method.
A process in which the receiving device decrypts the encrypted picture may be: The receiving device receives the encrypted picture sent by the sending device, receives the decryption key sent by the sending device, and decrypts the encrypted picture by using the decryption key to obtain the picture.
In a process of implementing the present disclosure, the inventor finds that the existing technology has at least the following problem:
When a third terminal other than a first terminal and a second terminal obtains the encrypted picture and the decryption key by means of network monitoring, the third terminal may decrypt the encrypted picture by using the decryption key. As a result, security of the encrypted picture is low.